import React,{ Component , Fragment} from 'react';
import { Link } from 'react-router-dom'
import goodsItem1 from '../../assets/homeGoods/g-item2.jpg';
import './GoodsLists.css'
export default class GoodsListItem extends Component{

    render(){
        let {pic,title,describe,discount,price,size,id} = this.props
        return(
            <Fragment>
                <Link to={`/details/${id}`} className = 'goods-lists-item'>
                    <div className='item-left'>
                        <img src = {pic} alt=''/>
                    </div>
                    <div className='item-right'>
                        <h2 className='list-title'>{title}</h2>
                        <p className = 'list-details'>{describe}</p>
                        <span className='list-discount'>{discount}</span>
                        <p className='list-price'>￥{price}<span className='list-size'>/{size}</span></p>
                    </div>
                </Link>
            </Fragment>
        )
    }
}